home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2098 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  776 b 

  1. Path: hades.rz.uni-sb.de!news
  2. From: bof@math.uni-sb.de (Patrick Schaaf)
  3. Newsgroups: comp.programming,alt.msdos.programmer,comp.lang.c++
  4. Subject: Re: How to detect HD
  5. Date: 15 Jan 1996 19:21:40 GMT
  6. Organization: in progress...
  7. Message-ID: <4de9g4$sc6@hades.rz.uni-sb.de>
  8. References: <4d5s19$m7l@nosy.bart.nl>
  9. NNTP-Posting-Host: briggs.math.uni-sb.de
  10.  
  11. painless@bart.nl (Steven van den Berg) writes:
  12.  
  13. >I want to detect all the harddisks in a computer with C, C++ or ASM,
  14. >can somebody tell me how to do this.
  15.  
  16. In C I would do something like this:
  17.  
  18. int get_nr_hds(void)
  19. {
  20.     int res = 0;
  21.  
  22.     printf("Hello User! Please open your computer and check the\n");
  23.     printf("number of HDs you have installed. Type that number: ");
  24.     fscanf(stdin, "%d", &res);
  25.     return res;
  26. }
  27.  
  28. bye :-)
  29.   Patrick
  30.